package com.example.test17;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class UserInfoMapperTest {
    @Autowired
    private UserInfoMapper userInfoMapper;
    @Test
    void select1() {
        UserInfo userInfo=new UserInfo();
        userInfo.setUsername("sss");
        System.out.println(userInfoMapper.select1(userInfo));
    }

    @Test
    void select2() {
        UserInfo userInfo=new UserInfo();
        userInfo.setUsername("sss");
        System.out.println(userInfoMapper.select2(userInfo));
    }

    @Test
    void select3() {
        System.out.println(userInfoMapper.select3("sss"));
    }

    @Test
    void select4() {
        System.out.println(userInfoMapper.select4("sss"));
        System.out.println(userInfoMapper.select4("'or 1='1"));
    }


    @Test
    void select5() {
        userInfoMapper.select5("asc").stream().forEach(System.out::println);
    }

    @Test
    void select6() {
        userInfoMapper.select6("s").stream().forEach(System.out::println);
    }
}